from datetime import datetime
from pydantic import BaseModel
from app.schemas.spot import SpotInOrder

class OrderCreate(BaseModel):
    spot_id: int
    quantity: int
    total_price: float
    visit_date: datetime

class OrderResponse(BaseModel):
    id: int
    user_id: int
    spot_id: int
    quantity: int
    total_price: float
    status: str
    visit_date: datetime
    created_at: datetime
    spot: SpotInOrder

    class Config:
        from_attributes = True 